
public class Circle extends Shape {
	
	//半径
	private double radius;

	@Override
	public double calArea() {
		this.setArea(Math.PI*radius*radius);
		return this.getArea();
	}

	@Override
	public double calPer() {
		this.setPer(Math.PI*radius*2);
		return this.getPer();
	}

	@Override
	public void showAll() {
	
		System.out.println("圆形半径为"+radius+"面积为"+calArea()+"周长为"+calPer());

	}

	//构造方法
	/**
	 * 
	 */
	public Circle() {
		super();
		// TODO Auto-generated constructor stub
	}

	
	/**
	 * @param color 颜色
	 * @param radius 半径
	 */
	public Circle(String color,double radius) {
		super(color);
		this.radius = radius;
		// TODO Auto-generated constructor stub
	}

	public double getRadius() {
		return radius;
	}

	public void setRadius(double radius) {
		this.radius = radius;
	}

	
	
	
	
	

}
